package musicstore.biz.impl;

import musicstore.biz.UserBiz;
import musicstore.dao.UserDao;
import musicstore.entity.User;

public class UserBizImpl implements UserBiz{

	private UserDao userDao;
	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

	@Override
	public User fetchUser(String username, String password) {
		return userDao.fetchUser(username, password);
	}

	@Override
	public void add(User user) {
		userDao.add(user);
	}

	@Override
	public boolean fetchUserByUsername(String username) {
		if(userDao.fetchUserByUsername(username)!=null)
			return true;
		else
			return false;
	}

}
